apex-ruby 1.0.30 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -8
- data/apex-ruby.gemspec +14 -3
- data/ext/apex_ext/apex_src/include/apex/apex.h +11 -2
- data/ext/apex_ext/apex_src/src/apex.c +64 -5
- data/ext/apex_ext/apex_src/src/ast_terminal.c +2 -4
- data/ext/apex_ext/apex_src/src/extensions/callouts.c +103 -63
- data/ext/apex_ext/apex_src/src/extensions/callouts.h +3 -2
- data/ext/apex_ext/apex_src/src/extensions/citations.c +15 -2
- data/ext/apex_ext/apex_src/src/extensions/emoji.c +73 -7
- data/ext/apex_ext/apex_src/src/extensions/html_markdown.c +25 -4
- data/ext/apex_ext/apex_src/src/extensions/html_markdown.h +4 -1
- data/ext/apex_ext/apex_src/src/extensions/insert.c +49 -0
- data/ext/apex_ext/apex_src/src/extensions/metadata.c +275 -55
- data/ext/apex_ext/apex_src/src/extensions/metadata.h +9 -0
- data/ext/apex_ext/apex_src/src/extensions/relaxed_tables.c +172 -254
- data/ext/apex_ext/apex_src/src/extensions/table_html_postprocess.c +36 -127
- data/ext/apex_ext/apex_src/src/html_renderer.c +99 -157
- data/ext/apex_ext/extconf.rb +31 -79
- data/lib/apex/version.rb +1 -1
- metadata +1 -470
- data/ext/apex_ext/apex_src/AGENTS.md +0 -41
- data/ext/apex_ext/apex_src/BENCHMARK.md +0 -32
- data/ext/apex_ext/apex_src/BENCHMARK_COMPARISON.md +0 -67
- data/ext/apex_ext/apex_src/CHANGELOG.md +0 -3373
- data/ext/apex_ext/apex_src/CMakeLists.txt +0 -481
- data/ext/apex_ext/apex_src/Dockerfile.linux-build +0 -15
- data/ext/apex_ext/apex_src/Formula/apex.rb +0 -43
- data/ext/apex_ext/apex_src/Info.plist.in +0 -27
- data/ext/apex_ext/apex_src/Package.swift +0 -192
- data/ext/apex_ext/apex_src/PackageSupport/README.md +0 -17
- data/ext/apex_ext/apex_src/PackageSupport/cmark-gfm/cmark_gfm_spm_stub.c +0 -4
- data/ext/apex_ext/apex_src/README.md +0 -536
- data/ext/apex_ext/apex_src/ROADMAP.md +0 -5
- data/ext/apex_ext/apex_src/VERSION +0 -1
- data/ext/apex_ext/apex_src/apex-debug.log +0 -4
- data/ext/apex_ext/apex_src/apex-header-2-rb@2x.webp +0 -0
- data/ext/apex_ext/apex_src/apex-plugins.json.example +0 -20
- data/ext/apex_ext/apex_src/apex.code-workspace +0 -38
- data/ext/apex_ext/apex_src/apex.pc.in +0 -11
- data/ext/apex_ext/apex_src/apex.taskpaper +0 -12
- data/ext/apex_ext/apex_src/apex_deflist_debug.log +0 -25
- data/ext/apex_ext/apex_src/buildnotes.md +0 -1435
- data/ext/apex_ext/apex_src/cli/main.c +0 -4588
- data/ext/apex_ext/apex_src/debug.log +0 -7
- data/ext/apex_ext/apex_src/debug_test.sh +0 -22
- data/ext/apex_ext/apex_src/docs/API_REFERENCE.md +0 -451
- data/ext/apex_ext/apex_src/docs/ARCHITECTURE.md +0 -166
- data/ext/apex_ext/apex_src/docs/CITATIONS_EXAMPLES.md +0 -274
- data/ext/apex_ext/apex_src/docs/CITATIONS_IMPLEMENTATION_PLAN.md +0 -749
- data/ext/apex_ext/apex_src/docs/CITATIONS_PLAN.md +0 -744
- data/ext/apex_ext/apex_src/docs/CMARK_INTEGRATION.md +0 -220
- data/ext/apex_ext/apex_src/docs/CRITICMARKUP.md +0 -501
- data/ext/apex_ext/apex_src/docs/DEBUGGING.md +0 -73
- data/ext/apex_ext/apex_src/docs/FINAL_STATUS.md +0 -391
- data/ext/apex_ext/apex_src/docs/FINAL_STATUS_UPDATE.md +0 -237
- data/ext/apex_ext/apex_src/docs/IAL_FEATURES.md +0 -210
- data/ext/apex_ext/apex_src/docs/IAL_STATUS.md +0 -344
- data/ext/apex_ext/apex_src/docs/INDEX_IMPLEMENTATION_ANALYSIS.md +0 -382
- data/ext/apex_ext/apex_src/docs/INTEGRATION_EXAMPLE.m +0 -144
- data/ext/apex_ext/apex_src/docs/LIMITATIONS_RESOLVED.md +0 -278
- data/ext/apex_ext/apex_src/docs/OUTPUT_MODES.md +0 -321
- data/ext/apex_ext/apex_src/docs/PROGRESS.md +0 -167
- data/ext/apex_ext/apex_src/docs/STANDALONE_FEATURE.md +0 -174
- data/ext/apex_ext/apex_src/docs/TABLE_SPANS_STATUS.md +0 -243
- data/ext/apex_ext/apex_src/docs/TEST_COVERAGE.md +0 -316
- data/ext/apex_ext/apex_src/docs/USER_GUIDE.md +0 -803
- data/ext/apex_ext/apex_src/docs/WIKI_LINKS_ISSUE.md +0 -91
- data/ext/apex_ext/apex_src/docs/index.md +0 -459
- data/ext/apex_ext/apex_src/docs/plans/2025-02-27-man-page-output-implementation.md +0 -351
- data/ext/apex_ext/apex_src/docs/superpowers/plans/2026-07-12-toc-output-format.md +0 -745
- data/ext/apex_ext/apex_src/docs/superpowers/plans/2026-07-18-bear-image-attributes.md +0 -829
- data/ext/apex_ext/apex_src/docs/superpowers/plans/2026-07-19-apex-node-npm.md +0 -1148
- data/ext/apex_ext/apex_src/docs/superpowers/specs/2026-07-12-toc-output-format-design.md +0 -161
- data/ext/apex_ext/apex_src/docs/superpowers/specs/2026-07-18-bear-image-attributes-design.md +0 -184
- data/ext/apex_ext/apex_src/docs/superpowers/specs/2026-07-19-apex-node-npm-design.md +0 -211
- data/ext/apex_ext/apex_src/documentation/README.md +0 -160
- data/ext/apex_ext/apex_src/documentation/app-settings-table.md +0 -67
- data/ext/apex_ext/apex_src/documentation/app-transformed/Citations.md +0 -340
- data/ext/apex_ext/apex_src/documentation/app-transformed/Credits.md +0 -11
- data/ext/apex_ext/apex_src/documentation/app-transformed/Header-IDs.md +0 -234
- data/ext/apex_ext/apex_src/documentation/app-transformed/Inline-Attribute-Lists.md +0 -516
- data/ext/apex_ext/apex_src/documentation/app-transformed/Metadata-Transforms.md +0 -461
- data/ext/apex_ext/apex_src/documentation/app-transformed/Modes.md +0 -193
- data/ext/apex_ext/apex_src/documentation/app-transformed/Multi-File-Documents.md +0 -201
- data/ext/apex_ext/apex_src/documentation/app-transformed/Plugins.md +0 -678
- data/ext/apex_ext/apex_src/documentation/app-transformed/Syntax.md +0 -1367
- data/ext/apex_ext/apex_src/documentation/docsets/Apex Command Line Options.cheatsheet.txt +0 -371
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Info.plist +0 -24
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/C-API.html +0 -2211
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Callouts.html +0 -1194
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Citations.html +0 -1620
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Command-Line-Options.html +0 -6024
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Configuration.html +0 -1877
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Credits.html +0 -1040
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Examples.html +0 -1402
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Filters.html +0 -1656
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Generating-Man-Pages.html +0 -1226
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Getting-Started.html +0 -1148
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Header-IDs.html +0 -1478
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Home.html +0 -1225
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Indices.html +0 -2327
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Inline-Attribute-Lists.html +0 -2041
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Installation.html +0 -1314
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Limitations-and-Roadmap.html +0 -1868
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Metadata-Transforms.html +0 -1731
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Modes.html +0 -2242
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Multi-File-Documents.html +0 -1533
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Multi-Format-Images.html +0 -1362
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Pandoc-Integration.html +0 -1338
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Plugins.html +0 -3188
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Quarto-Mode.html +0 -1405
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Rendering-Markdown-In-Terminal.html +0 -1902
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Syntax.html +0 -4222
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Tables.html +0 -1781
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Troubleshooting.html +0 -1629
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Usage.html +0 -1394
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Using-Apex-with-Jekyll.html +0 -1132
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Writing-Tests.html +0 -1754
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/Documents/Xcode-Integration.html +0 -2562
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/docSet.dsidx +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/Apex.docset/Contents/Resources/optimizedIndex.dsidx +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Info.plist +0 -22
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold_Italic.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold_Italic.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Italic.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold_Italic.woff +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/index.html +0 -914
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/Documents/style.css +0 -399
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/docSet.dsidx +0 -0
- data/ext/apex_ext/apex_src/documentation/docsets/ApexCLI.docset/Contents/Resources/optimizedIndex.dsidx +0 -0
- data/ext/apex_ext/apex_src/documentation/generate_app_docs.rb +0 -772
- data/ext/apex_ext/apex_src/documentation/generate_app_docs_ai.rb +0 -678
- data/ext/apex_ext/apex_src/documentation/generate_docset.rb +0 -873
- data/ext/apex_ext/apex_src/documentation/generate_single_html.rb +0 -733
- data/ext/apex_ext/apex_src/documentation/html/apex-app-docs.html +0 -8746
- data/ext/apex_ext/apex_src/documentation/html/apex-docs.html +0 -17073
- data/ext/apex_ext/apex_src/documentation/shared_scripts.js +0 -64
- data/ext/apex_ext/apex_src/documentation/shared_styles.css +0 -651
- data/ext/apex_ext/apex_src/documentation/transform_for_app.example.md +0 -260
- data/ext/apex_ext/apex_src/documentation/transform_for_app.md +0 -55
- data/ext/apex_ext/apex_src/escaping-repro.md +0 -103
- data/ext/apex_ext/apex_src/examples/bracketed_spans_demo.md +0 -119
- data/ext/apex_ext/apex_src/examples/emoji_span_plugin.yml +0 -11
- data/ext/apex_ext/apex_src/examples/example.html +0 -53
- data/ext/apex_ext/apex_src/examples/example.md +0 -85
- data/ext/apex_ext/apex_src/examples/fenced_divs_demo.md +0 -158
- data/ext/apex_ext/apex_src/examples/kbd.md +0 -8
- data/ext/apex_ext/apex_src/examples/kbd_plugin.rb +0 -250
- data/ext/apex_ext/apex_src/examples/kbd_plugin.yml +0 -9
- data/ext/apex_ext/apex_src/examples/quick-actions/Markdown to RTF.workflow/Contents/Info.plist +0 -8
- data/ext/apex_ext/apex_src/examples/quick-actions/Markdown to RTF.workflow/Contents/QuickLook/Preview.png +0 -0
- data/ext/apex_ext/apex_src/examples/quick-actions/Markdown to RTF.workflow/Contents/document.wflow +0 -547
- data/ext/apex_ext/apex_src/examples/quick-actions/Markdown-to-RTF.workflow.zip +0 -0
- data/ext/apex_ext/apex_src/examples/quick-actions/README.md +0 -33
- data/ext/apex_ext/apex_src/ial.html +0 -24
- data/ext/apex_ext/apex_src/icon/apexicon-outline-black.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon-outline-black@2x.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon-outline-mark.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon-outline-mark@2x.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon-outline-white.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon-outline-white@2x.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon.png +0 -0
- data/ext/apex_ext/apex_src/icon/apexicon@2x.png +0 -0
- data/ext/apex_ext/apex_src/man/apex-config.5 +0 -455
- data/ext/apex_ext/apex_src/man/apex-config.5.md +0 -262
- data/ext/apex_ext/apex_src/man/apex-plugins.7 +0 -541
- data/ext/apex_ext/apex_src/man/apex-plugins.7.md +0 -365
- data/ext/apex_ext/apex_src/man/apex.1 +0 -583
- data/ext/apex_ext/apex_src/man/apex.1.html +0 -703
- data/ext/apex_ext/apex_src/man/apex.1.md +0 -803
- data/ext/apex_ext/apex_src/man/apex.1.new +0 -338
- data/ext/apex_ext/apex_src/objc/Apex.swift +0 -316
- data/ext/apex_ext/apex_src/objc/ApexPlugins.swift +0 -79
- data/ext/apex_ext/apex_src/objc/NSString+Apex.h +0 -207
- data/ext/apex_ext/apex_src/objc/NSString+Apex.m +0 -584
- data/ext/apex_ext/apex_src/objc/NSString+ApexPlugins.h +0 -76
- data/ext/apex_ext/apex_src/objc/NSString+ApexPlugins.m +0 -169
- data/ext/apex_ext/apex_src/output.html +0 -87
- data/ext/apex_ext/apex_src/pages/index.md +0 -459
- data/ext/apex_ext/apex_src/plans/quarto-mode.md +0 -442
- data/ext/apex_ext/apex_src/src/_README.md +0 -413
- data/ext/apex_ext/apex_src/src/extensions/github-emoji.txt +0 -869
- data/ext/apex_ext/apex_src/test-linux-build.sh +0 -20
- data/ext/apex_ext/apex_src/test.html +0 -103
- data/ext/apex_ext/apex_src/test_coverage.sh +0 -121
- data/ext/apex_ext/apex_src/test_ial_fenced.md +0 -6
- data/ext/apex_ext/apex_src/test_math_norm.py +0 -79
- data/ext/apex_ext/apex_src/test_pandoc_output.html +0 -48
- data/ext/apex_ext/apex_src/test_spm.sh +0 -107
- data/ext/apex_ext/apex_src/tests/ApexSPMTest/main.swift +0 -50
- data/ext/apex_ext/apex_src/tests/BENCHMARK_RESULTS.md +0 -229
- data/ext/apex_ext/apex_src/tests/CMakeLists.txt +0 -25
- data/ext/apex_ext/apex_src/tests/README.md +0 -152
- data/ext/apex_ext/apex_src/tests/benchmark.sh +0 -113
- data/ext/apex_ext/apex_src/tests/benchmark_comparison.sh +0 -166
- data/ext/apex_ext/apex_src/tests/compare_header_ids.sh +0 -31
- data/ext/apex_ext/apex_src/tests/fixtures/basic/headers.md +0 -25
- data/ext/apex_ext/apex_src/tests/fixtures/basic/list-interruption.md +0 -24
- data/ext/apex_ext/apex_src/tests/fixtures/basic/misc_markup.md +0 -33
- data/ext/apex_ext/apex_src/tests/fixtures/basic/test_basic.md +0 -26
- data/ext/apex_ext/apex_src/tests/fixtures/code/code-blocks.md +0 -260
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/SUMMARY.md +0 -6
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/chapter1.md +0 -7
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/index.txt +0 -9
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/intro.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/combine_summary/section1_1.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/comprehensive_test.md +0 -652
- data/ext/apex_ext/apex_src/tests/fixtures/debug_ref_image_ial.md +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/demos/ial.md +0 -11
- data/ext/apex_ext/apex_src/tests/fixtures/demos/ial_demo.md +0 -177
- data/ext/apex_ext/apex_src/tests/fixtures/extensions/emoji-autocorrect.md +0 -94
- data/ext/apex_ext/apex_src/tests/fixtures/extensions/emoji_test.md +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/extensions/kbd_test.md +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/filters/filter_output_with_rawblock.json +0 -1
- data/ext/apex_ext/apex_src/tests/fixtures/filters/unwrap.md +0 -7
- data/ext/apex_ext/apex_src/tests/fixtures/ial/bracketed_spans_test.md +0 -74
- data/ext/apex_ext/apex_src/tests/fixtures/images/auto-wildcard.md +0 -8
- data/ext/apex_ext/apex_src/tests/fixtures/images/bear_image_attributes.md +0 -10
- data/ext/apex_ext/apex_src/tests/fixtures/images/image_and_encoding_test.md +0 -27
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu.avif +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu.jpg +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu.webp +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu@2x.avif +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu@2x.jpg +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/img/app-pass-1-profile-menu@2x.webp +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/images/media_formats_test.md +0 -63
- data/ext/apex_ext/apex_src/tests/fixtures/images/multimarkdown_image_attributes_test.md +0 -60
- data/ext/apex_ext/apex_src/tests/fixtures/images/pandoc_ial_image_test.md +0 -27
- data/ext/apex_ext/apex_src/tests/fixtures/images/width_height_conversion_test.md +0 -94
- data/ext/apex_ext/apex_src/tests/fixtures/img-in-div.md +0 -16
- data/ext/apex_ext/apex_src/tests/fixtures/includes/code.py +0 -4
- data/ext/apex_ext/apex_src/tests/fixtures/includes/data-semi.csv +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/includes/data.csv +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/includes/data.tsv +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/includes/image.png +0 -2
- data/ext/apex_ext/apex_src/tests/fixtures/includes/metadata_options.yml +0 -11
- data/ext/apex_ext/apex_src/tests/fixtures/includes/nested.md +0 -8
- data/ext/apex_ext/apex_src/tests/fixtures/includes/raw.html +0 -4
- data/ext/apex_ext/apex_src/tests/fixtures/includes/sections.md +0 -19
- data/ext/apex_ext/apex_src/tests/fixtures/includes/sections.txt +0 -11
- data/ext/apex_ext/apex_src/tests/fixtures/includes/simple.md +0 -7
- data/ext/apex_ext/apex_src/tests/fixtures/includes/test_image.png +0 -0
- data/ext/apex_ext/apex_src/tests/fixtures/includes/with space.txt +0 -1
- data/ext/apex_ext/apex_src/tests/fixtures/large_doc.md +0 -1094
- data/ext/apex_ext/apex_src/tests/fixtures/metadata/mmd-metadata.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/metadata/pandoc-meta.md +0 -4
- data/ext/apex_ext/apex_src/tests/fixtures/metadata/yaml-frontmatter.md +0 -6
- data/ext/apex_ext/apex_src/tests/fixtures/metadata_options.yml +0 -11
- data/ext/apex_ext/apex_src/tests/fixtures/minimal_pb.md +0 -2
- data/ext/apex_ext/apex_src/tests/fixtures/obsidian-callouts.md +0 -46
- data/ext/apex_ext/apex_src/tests/fixtures/output/gfm_header_id_test.md +0 -96
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_citations.md +0 -43
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_def_list_links.md +0 -12
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_index_mmark.md +0 -53
- data/ext/apex_ext/apex_src/tests/fixtures/output/test_index_textindex.md +0 -37
- data/ext/apex_ext/apex_src/tests/fixtures/pagebreak_html_repro.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/python-callouts.md +0 -47
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/callouts.md +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/code-attrs.md +0 -3
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/diagrams.md +0 -8
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/lists.md +0 -19
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/raw-content.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/shortcodes.md +0 -7
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/smoke.md +0 -81
- data/ext/apex_ext/apex_src/tests/fixtures/quarto/spans.md +0 -5
- data/ext/apex_ext/apex_src/tests/fixtures/quarto-callouts.md +0 -47
- data/ext/apex_ext/apex_src/tests/fixtures/speed.md +0 -192
- data/ext/apex_ext/apex_src/tests/fixtures/tables/advanced_tables_test.md +0 -93
- data/ext/apex_ext/apex_src/tests/fixtures/tables/grid-tables.md +0 -37
- data/ext/apex_ext/apex_src/tests/fixtures/tables/inline_tables_test.md +0 -41
- data/ext/apex_ext/apex_src/tests/fixtures/tables/relaxed-table.md +0 -12
- data/ext/apex_ext/apex_src/tests/fixtures/tables/table_cr_line_endings.md +0 -15
- data/ext/apex_ext/apex_src/tests/fixtures/tables/table_no_trailing_newline.md +0 -15
- data/ext/apex_ext/apex_src/tests/generate_gfm_ids.sh +0 -105
- data/ext/apex_ext/apex_src/tests/generate_ial_demo.sh +0 -143
- data/ext/apex_ext/apex_src/tests/gfm_id_comparison_summary.md +0 -96
- data/ext/apex_ext/apex_src/tests/gh_api_test.md +0 -6
- data/ext/apex_ext/apex_src/tests/ial_demo.html +0 -186
- data/ext/apex_ext/apex_src/tests/include_code.py +0 -19
- data/ext/apex_ext/apex_src/tests/include_snippet.md +0 -15
- data/ext/apex_ext/apex_src/tests/metadata_cli_test.sh +0 -119
- data/ext/apex_ext/apex_src/tests/multi_file_cli_test.sh +0 -64
- data/ext/apex_ext/apex_src/tests/paginate_cli_test.sh +0 -80
- data/ext/apex_ext/apex_src/tests/sample_data.csv +0 -7
- data/ext/apex_ext/apex_src/tests/table_escaped_ltlt.md +0 -4
- data/ext/apex_ext/apex_src/tests/terminal_width_test.sh +0 -29
- data/ext/apex_ext/apex_src/tests/test-swift-package.sh +0 -14
- data/ext/apex_ext/apex_src/tests/test_basic.c +0 -74
- data/ext/apex_ext/apex_src/tests/test_bear_image_attrs.c +0 -301
- data/ext/apex_ext/apex_src/tests/test_cmark_callback.c +0 -189
- data/ext/apex_ext/apex_src/tests/test_concordance.tsv +0 -4
- data/ext/apex_ext/apex_src/tests/test_custom_plugins.c +0 -78
- data/ext/apex_ext/apex_src/tests/test_escaping_repro.c +0 -82
- data/ext/apex_ext/apex_src/tests/test_extensions.c +0 -3337
- data/ext/apex_ext/apex_src/tests/test_helpers.c +0 -183
- data/ext/apex_ext/apex_src/tests/test_helpers.h +0 -91
- data/ext/apex_ext/apex_src/tests/test_ial.c +0 -289
- data/ext/apex_ext/apex_src/tests/test_links.c +0 -418
- data/ext/apex_ext/apex_src/tests/test_marked_integration.c +0 -290
- data/ext/apex_ext/apex_src/tests/test_metadata.c +0 -1147
- data/ext/apex_ext/apex_src/tests/test_output.c +0 -2056
- data/ext/apex_ext/apex_src/tests/test_plugins.c +0 -219
- data/ext/apex_ext/apex_src/tests/test_refs.bib +0 -31
- data/ext/apex_ext/apex_src/tests/test_runner.c +0 -268
- data/ext/apex_ext/apex_src/tests/test_syntax_highlight.c +0 -198
- data/ext/apex_ext/apex_src/tests/test_tables.c +0 -1298
- data/ext/apex_ext/apex_src/tests/update_benchmarks.sh +0 -9
- data/ext/apex_ext/apex_src/tests/yaml_test.md +0 -13
- data/ext/apex_ext/apex_src/tests.rb +0 -39
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/CMakeLists.txt +0 -48
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/CheckFileOffsetBits.c +0 -14
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/CheckFileOffsetBits.cmake +0 -43
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/FindAsan.cmake +0 -74
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/Makefile.nmake +0 -38
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/README.md +0 -206
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/CMakeLists.txt +0 -30
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/cplusplus.cpp +0 -15
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/cplusplus.h +0 -16
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/harness.c +0 -111
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/harness.h +0 -35
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/api_test/main.c +0 -1169
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/appveyor.yml +0 -21
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-bq-flat.md +0 -16
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-bq-nested.md +0 -13
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-code.md +0 -11
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-fences.md +0 -14
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-heading.md +0 -9
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-hr.md +0 -10
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-html.md +0 -32
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-lheading.md +0 -8
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-list-flat.md +0 -67
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-list-nested.md +0 -36
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-ref-flat.md +0 -15
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/block-ref-nested.md +0 -17
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-autolink.md +0 -14
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-backticks.md +0 -3
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-flat.md +0 -5
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-nested.md +0 -5
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-em-worst.md +0 -5
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-entity.md +0 -11
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-escape.md +0 -15
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-html.md +0 -44
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-links-flat.md +0 -23
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-links-nested.md +0 -13
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/inline-newlines.md +0 -24
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/lorem1.md +0 -13
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/samples/rawtabs.md +0 -18
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/statistics.py +0 -595
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/bench/stats.py +0 -19
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/benchmarks.md +0 -33
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/changelog.txt +0 -1245
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/data/CaseFolding.txt +0 -1495
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/CMakeLists.txt +0 -119
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/extensions/ext_scanners.re +0 -92
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/CMakeLists.txt +0 -22
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/README.md +0 -12
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzz_quadratic.c +0 -91
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzz_quadratic_brackets.c +0 -110
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/fuzz/fuzzloop.sh +0 -28
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/CMakeLists.txt +0 -10
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/make_man_page.py +0 -133
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/man1/cmark-gfm.1 +0 -78
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/man/man3/cmark-gfm.3 +0 -1041
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/nmake.bat +0 -1
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/CMakeLists.txt +0 -230
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/cmark-gfm_version.h.in +0 -7
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/config.h +0 -38
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/config.h.in +0 -76
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/libcmark-gfm.pc.in +0 -10
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/src/scanners.re +0 -365
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/suppressions +0 -10
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/CMakeLists.txt +0 -114
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/__pycache__/cmark.cpython-314.pyc +0 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/__pycache__/normalize.cpython-314.pyc +0 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/afl_test_cases/test.md +0 -49
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/cmark-fuzz.c +0 -58
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/cmark.py +0 -105
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/entity_tests.py +0 -67
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/extensions-full-info-string.txt +0 -0
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/extensions-table-prefer-style-attributes.txt +0 -38
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/extensions.txt +0 -989
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/fuzzing_dictionary +0 -67
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/normalize.py +0 -194
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/pathological_tests.py +0 -160
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/regression.txt +0 -375
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/roundtrip_tests.py +0 -50
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/run-cmark-fuzz +0 -4
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/smart_punct.txt +0 -177
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/spec.txt +0 -10212
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/test/spec_tests.py +0 -152
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/toolchain-mingw32.cmake +0 -17
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/Dockerfile +0 -41
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/appveyor-build.bat +0 -13
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/make_entities_inc.py +0 -32
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/mkcasefold.pl +0 -22
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/xml2md.xsl +0 -319
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/tools/xml2md_gfm.xsl +0 -80
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/why-cmark-and-not-x.md +0 -104
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.js +0 -6
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.py +0 -37
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.rb +0 -15
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper.rkt +0 -208
- data/ext/apex_ext/apex_src/vendor/cmark-gfm/wrappers/wrapper_ext.py +0 -109
- data/ext/apex_ext/apex_src/vendor/libyaml/CMakeLists.txt +0 -160
- data/ext/apex_ext/apex_src/vendor/libyaml/Changes +0 -372
- data/ext/apex_ext/apex_src/vendor/libyaml/License +0 -20
- data/ext/apex_ext/apex_src/vendor/libyaml/Makefile.am +0 -51
- data/ext/apex_ext/apex_src/vendor/libyaml/ReadMe.md +0 -46
- data/ext/apex_ext/apex_src/vendor/libyaml/announcement.msg +0 -89
- data/ext/apex_ext/apex_src/vendor/libyaml/bootstrap +0 -3
- data/ext/apex_ext/apex_src/vendor/libyaml/cmake/config.h.in +0 -4
- data/ext/apex_ext/apex_src/vendor/libyaml/configure.ac +0 -73
- data/ext/apex_ext/apex_src/vendor/libyaml/doc/doxygen.cfg +0 -222
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/README.mkd +0 -17
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/alpine-3.7 +0 -26
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/fedora-25 +0 -26
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/ubuntu-14.04 +0 -29
- data/ext/apex_ext/apex_src/vendor/libyaml/docker/ubuntu-16.04 +0 -24
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/anchors.yaml +0 -10
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/array.yaml +0 -2
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/global-tag.yaml +0 -14
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/json.yaml +0 -1
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/mapping.yaml +0 -2
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/numbers.yaml +0 -1
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/strings.yaml +0 -7
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/tags.yaml +0 -7
- data/ext/apex_ext/apex_src/vendor/libyaml/examples/yaml-version.yaml +0 -3
- data/ext/apex_ext/apex_src/vendor/libyaml/include/Makefile.am +0 -17
- data/ext/apex_ext/apex_src/vendor/libyaml/include/yaml.h +0 -1999
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/ReadMe.md +0 -77
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/Dockerfile +0 -32
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/output/ReadMe +0 -1
- data/ext/apex_ext/apex_src/vendor/libyaml/pkg/docker/scripts/libyaml-dist.sh +0 -23
- data/ext/apex_ext/apex_src/vendor/libyaml/regression-inputs/clusterfuzz-testcase-minimized-5607885063061504.yml +0 -1
- data/ext/apex_ext/apex_src/vendor/libyaml/src/Makefile.am +0 -4
- data/ext/apex_ext/apex_src/vendor/libyaml/src/api.c +0 -1393
- data/ext/apex_ext/apex_src/vendor/libyaml/src/dumper.c +0 -394
- data/ext/apex_ext/apex_src/vendor/libyaml/src/emitter.c +0 -2358
- data/ext/apex_ext/apex_src/vendor/libyaml/src/loader.c +0 -544
- data/ext/apex_ext/apex_src/vendor/libyaml/src/parser.c +0 -1416
- data/ext/apex_ext/apex_src/vendor/libyaml/src/reader.c +0 -469
- data/ext/apex_ext/apex_src/vendor/libyaml/src/scanner.c +0 -3598
- data/ext/apex_ext/apex_src/vendor/libyaml/src/writer.c +0 -141
- data/ext/apex_ext/apex_src/vendor/libyaml/src/yaml_private.h +0 -684
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/CMakeLists.txt +0 -27
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/Makefile.am +0 -9
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/ReadMe.md +0 -63
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-deconstructor-alt.c +0 -800
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-deconstructor.c +0 -1127
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-reformatter-alt.c +0 -217
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/example-reformatter.c +0 -202
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-all-tests.sh +0 -29
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-dumper.c +0 -314
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-emitter-test-suite.c +0 -290
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-emitter.c +0 -327
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-loader.c +0 -63
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-parser-test-suite.c +0 -196
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-parser.c +0 -88
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/run-scanner.c +0 -63
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/test-reader.c +0 -354
- data/ext/apex_ext/apex_src/vendor/libyaml/tests/test-version.c +0 -29
- data/ext/apex_ext/apex_src/vendor/libyaml/yaml-0.1.pc.in +0 -10
- data/ext/apex_ext/apex_src/vendor/libyaml/yamlConfig.cmake.in +0 -16
- data/ext/apex_ext/apex_src/xcode_build/CMakeScripts/ReRunCMake.make +0 -74
- data/ext/apex_ext/apex_src/xcode_build/CTestTestfile.cmake +0 -22
- data/ext/apex_ext/apex_src/xcode_build/Debug/Apex.framework/Versions/A/Apex +0 -0
- data/ext/apex_ext/apex_src/xcode_build/Debug/Apex.framework/Versions/A/Resources/Info.plist +0 -44
- data/ext/apex_ext/apex_src/xcode_build/Debug/Apex.framework/Versions/A/_CodeSignature/CodeResources +0 -128
- data/ext/apex_ext/apex_src/xcode_build/apex.xcodeproj/project.pbxproj +0 -5118
- data/ext/apex_ext/apex_src/xcode_build/apex.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -8
- data/ext/apex_ext/apex_src/xcode_build/apex.xcodeproj/project.xcworkspace/xcuserdata/ttscoff.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/ext/apex_ext/apex_src/xcode_build/apex.xcodeproj/project.xcworkspace/xcuserdata/ttscoff.xcuserdatad/WorkspaceSettings.xcsettings +0 -8
- data/ext/apex_ext/apex_src/xcode_build/apex.xcodeproj/xcuserdata/ttscoff.xcuserdatad/xcschemes/xcschememanagement.plist +0 -99
- data/ext/apex_ext/apex_src/xcode_build/cmake_install.cmake +0 -452
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/CMakeScripts/ReRunCMake.make +0 -52
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/cmake_install.cmake +0 -55
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/cmark-gfm.xcodeproj/project.pbxproj +0 -2455
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/cmark-gfm.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -8
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/extensions/cmake_install.cmake +0 -171
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/man/cmake_install.cmake +0 -55
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/src/cmake_install.cmake +0 -220
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/src/cmark-gfm_export.h +0 -43
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/src/cmark-gfm_version.h +0 -7
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/src/config.h +0 -76
- data/ext/apex_ext/apex_src/xcode_build/vendor/cmark-gfm/src/libcmark-gfm.pc +0 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2bae37f85a39a9fdbc9d8c146cc6cfaacc99442e286ff03a3acb19161bfe81b8
|
|
4
|
+
data.tar.gz: 7892124de93b9f9bf4d1f043fe8bd4d2329267cd5160cf6a96f747a7a673b38b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5305e310038cad306c81b9426b0c2fdf862a5d562c0a7b2e4d8892d380153f6fafd5f2462833ab5a0351380bcc686326a65768a242ab9b3e557a57275cd99d2e
|
|
7
|
+
data.tar.gz: 182de5280787b96a01e1877397810d5d039ee71816c91a25a799ab62cc7e43734ecd26e2eff3b0cc6e8d0447a4ea7c56198042dce2c4565978b8cadb643dc82b
|
data/README.md
CHANGED
|
@@ -10,15 +10,9 @@ Query the underlying C library version with `Apex::Native.version`.
|
|
|
10
10
|
|
|
11
11
|
## Requirements
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
The gem compiles a native extension, so you need a C compiler (Xcode Command Line Tools on macOS, `build-essential` or equivalent on Linux). Apex's patched copy of [cmark-gfm](https://github.com/ApexMarkdown/cmark-gfm) is bundled and compiled into the extension; a system cmark-gfm is not needed and is not used.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
brew install cmark-gfm
|
|
18
|
-
```
|
|
19
|
-
- **Other platforms:** Install the `cmark-gfm` package for your distribution and ensure development headers and `pkg-config` are available. See [cmark-gfm](https://github.com/github/cmark-gfm) for build instructions.
|
|
20
|
-
|
|
21
|
-
If you run `gem install apex-ruby` without cmark-gfm installed, the build will fail with a clear error message and the same installation instructions.
|
|
15
|
+
libyaml is optional. If it is installed (e.g. `brew install libyaml`), Apex uses it for nested YAML front matter; otherwise it falls back to its simple key: value parser.
|
|
22
16
|
|
|
23
17
|
## Installation
|
|
24
18
|
|
data/apex-ruby.gemspec
CHANGED
|
@@ -13,15 +13,26 @@ Gem::Specification.new do |spec|
|
|
|
13
13
|
|
|
14
14
|
spec.required_ruby_version = '>= 3.0'
|
|
15
15
|
|
|
16
|
+
# Only the tracked Apex and cmark-gfm sources the extension build needs;
|
|
17
|
+
# the rest of the apex checkout (tests, docs, build dirs, logs) stays out.
|
|
18
|
+
apex_src_dir = File.join(__dir__, 'ext', 'apex_ext', 'apex_src')
|
|
19
|
+
apex_src_pattern = %r{\A(?:LICENSE|include/.+\.(?:h|modulemap)|src/.+\.[ch]|PackageSupport/cmark-gfm/[^/]+\.h|
|
|
20
|
+
vendor/cmark-gfm/(?:COPYING|src/[^/]+\.(?:c|h|inc)|extensions/[^/]+\.[ch]))\z}x
|
|
21
|
+
apex_src_files = Dir.chdir(apex_src_dir) do
|
|
22
|
+
tracked = `git ls-files -z --recurse-submodules 2>/dev/null`.split("\0")
|
|
23
|
+
tracked = Dir.glob('**/*') if tracked.empty?
|
|
24
|
+
tracked.grep(apex_src_pattern)
|
|
25
|
+
end
|
|
26
|
+
|
|
16
27
|
spec.files = Dir.chdir(__dir__) do
|
|
17
28
|
Dir[
|
|
18
29
|
'README.md',
|
|
19
30
|
'apex-ruby.gemspec',
|
|
20
31
|
'lib/**/*.rb',
|
|
21
|
-
'ext
|
|
22
|
-
'ext/apex_ext/
|
|
32
|
+
'ext/apex_ext/apex_ext.c',
|
|
33
|
+
'ext/apex_ext/extconf.rb'
|
|
23
34
|
]
|
|
24
|
-
end
|
|
35
|
+
end + apex_src_files.map { |f| "ext/apex_ext/apex_src/#{f}" }
|
|
25
36
|
|
|
26
37
|
spec.require_paths = ['lib']
|
|
27
38
|
spec.extensions = ['ext/apex_ext/extconf.rb']
|
|
@@ -21,8 +21,8 @@ typedef struct cmark_node cmark_node;
|
|
|
21
21
|
|
|
22
22
|
#define APEX_VERSION_MAJOR 1
|
|
23
23
|
#define APEX_VERSION_MINOR 1
|
|
24
|
-
#define APEX_VERSION_PATCH
|
|
25
|
-
#define APEX_VERSION_STRING "1.1.
|
|
24
|
+
#define APEX_VERSION_PATCH 32
|
|
25
|
+
#define APEX_VERSION_STRING "1.1.32"
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Processor compatibility modes
|
|
@@ -271,6 +271,7 @@ typedef struct apex_options {
|
|
|
271
271
|
bool enable_aria; /* Add ARIA labels and accessibility attributes to HTML output */
|
|
272
272
|
|
|
273
273
|
/* Emoji options */
|
|
274
|
+
bool enable_emoji; /* Replace :name: with Unicode/image emoji (GFM/unified family by default) */
|
|
274
275
|
bool enable_emoji_autocorrect; /* Enable emoji name autocorrect (enabled by default in unified mode) */
|
|
275
276
|
|
|
276
277
|
/* Syntax highlighting options */
|
|
@@ -359,6 +360,14 @@ apex_options apex_options_for_mode(apex_mode_t mode);
|
|
|
359
360
|
*/
|
|
360
361
|
bool apex_options_apply_meta_file(apex_options *options, const char *path);
|
|
361
362
|
|
|
363
|
+
/**
|
|
364
|
+
* Register cmark-gfm's core extensions once.
|
|
365
|
+
* cmark_gfm_core_extensions_ensure_registered() is not thread-safe: a second
|
|
366
|
+
* overlapping call aborts in cmark_register_node_flag. Marked converts on a
|
|
367
|
+
* concurrent queue, so every cmark entry point must go through this.
|
|
368
|
+
*/
|
|
369
|
+
void apex_ensure_cmark_extensions(void);
|
|
370
|
+
|
|
362
371
|
/**
|
|
363
372
|
* Main conversion function: Markdown to HTML
|
|
364
373
|
*
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
#include <sys/stat.h>
|
|
8
8
|
#include <unistd.h>
|
|
9
9
|
#include <sys/time.h>
|
|
10
|
+
#include <pthread.h>
|
|
10
11
|
|
|
11
12
|
/* cmark-gfm headers */
|
|
12
13
|
#include "cmark-gfm.h"
|
|
@@ -2510,6 +2511,48 @@ static char *apex_preprocess_nested_ordered_sublists(const char *text,
|
|
|
2510
2511
|
return output;
|
|
2511
2512
|
}
|
|
2512
2513
|
|
|
2514
|
+
/* cmark-gfm's tasklist scanner matches from the start of the physical line,
|
|
2515
|
+
* so "> - [ ] item" (including callout bodies) is never recognized. Convert
|
|
2516
|
+
* those items after parsing. */
|
|
2517
|
+
static void apex_fix_blockquote_tasklists(cmark_node *node, cmark_syntax_extension *tasklist_ext,
|
|
2518
|
+
int blockquote_depth) {
|
|
2519
|
+
if (!node || !tasklist_ext) return;
|
|
2520
|
+
|
|
2521
|
+
cmark_node_type type = cmark_node_get_type(node);
|
|
2522
|
+
if (type == CMARK_NODE_BLOCK_QUOTE) {
|
|
2523
|
+
blockquote_depth++;
|
|
2524
|
+
} else if (type == CMARK_NODE_ITEM && blockquote_depth > 0 &&
|
|
2525
|
+
cmark_node_get_syntax_extension(node) != tasklist_ext) {
|
|
2526
|
+
cmark_node *para = cmark_node_first_child(node);
|
|
2527
|
+
cmark_node *text = para && cmark_node_get_type(para) == CMARK_NODE_PARAGRAPH
|
|
2528
|
+
? cmark_node_first_child(para) : NULL;
|
|
2529
|
+
const char *lit = text && cmark_node_get_type(text) == CMARK_NODE_TEXT
|
|
2530
|
+
? cmark_node_get_literal(text) : NULL;
|
|
2531
|
+
if (lit && lit[0] == '[' && (lit[1] == ' ' || lit[1] == 'x' || lit[1] == 'X') &&
|
|
2532
|
+
lit[2] == ']' && (lit[3] == ' ' || lit[3] == '\t' ||
|
|
2533
|
+
(lit[3] == '\0' && !cmark_node_next(text)))) {
|
|
2534
|
+
bool checked = lit[1] != ' ';
|
|
2535
|
+
const char *rest = lit + 3;
|
|
2536
|
+
while (*rest == ' ' || *rest == '\t') rest++;
|
|
2537
|
+
if (*rest) {
|
|
2538
|
+
char *copy = strdup(rest);
|
|
2539
|
+
if (copy) {
|
|
2540
|
+
cmark_node_set_literal(text, copy);
|
|
2541
|
+
free(copy);
|
|
2542
|
+
}
|
|
2543
|
+
} else {
|
|
2544
|
+
cmark_node_free(text);
|
|
2545
|
+
}
|
|
2546
|
+
cmark_node_set_syntax_extension(node, tasklist_ext);
|
|
2547
|
+
cmark_gfm_extensions_set_tasklist_item_checked(node, checked);
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
for (cmark_node *child = cmark_node_first_child(node); child; child = cmark_node_next(child)) {
|
|
2552
|
+
apex_fix_blockquote_tasklists(child, tasklist_ext, blockquote_depth);
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2513
2556
|
/* Force tight rendering for lists synthesized from nested ordered sublist fixes. */
|
|
2514
2557
|
static void apex_tighten_nested_ordered_list_items(cmark_node *node) {
|
|
2515
2558
|
if (!node) return;
|
|
@@ -3039,6 +3082,7 @@ apex_options apex_options_default(void) {
|
|
|
3039
3082
|
opts.enable_aria = false;
|
|
3040
3083
|
|
|
3041
3084
|
/* Emoji options */
|
|
3085
|
+
opts.enable_emoji = true; /* :name: replacement on by default (unified); modes may turn off */
|
|
3042
3086
|
opts.enable_emoji_autocorrect = true; /* Enabled by default in unified mode */
|
|
3043
3087
|
|
|
3044
3088
|
/* Syntax highlighting options */
|
|
@@ -3127,6 +3171,7 @@ apex_options apex_options_for_mode(apex_mode_t mode) {
|
|
|
3127
3171
|
opts.enable_autolink = false; /* CommonMark: no autolinks */
|
|
3128
3172
|
opts.enable_image_captions = false; /* CommonMark: no automatic image figure captions */
|
|
3129
3173
|
opts.enable_citations = false; /* CommonMark: no citations */
|
|
3174
|
+
opts.enable_emoji = false; /* CommonMark: no :name: emoji replacement */
|
|
3130
3175
|
opts.enable_emoji_autocorrect = false; /* CommonMark: no emoji autocorrect */
|
|
3131
3176
|
/* Disable HTML markdown processing in strict CommonMark */
|
|
3132
3177
|
opts.enable_markdown_in_html = false;
|
|
@@ -3164,6 +3209,7 @@ apex_options apex_options_for_mode(apex_mode_t mode) {
|
|
|
3164
3209
|
opts.enable_autolink = true; /* GFM: autolinks enabled */
|
|
3165
3210
|
opts.enable_image_captions = false; /* GFM: no automatic image figure captions */
|
|
3166
3211
|
opts.enable_citations = false; /* GFM: no citations */
|
|
3212
|
+
opts.enable_emoji = true; /* GFM: :name: emoji replacement enabled */
|
|
3167
3213
|
opts.enable_emoji_autocorrect = false; /* GFM: no emoji autocorrect by default */
|
|
3168
3214
|
/* Disable HTML markdown processing in GFM mode */
|
|
3169
3215
|
opts.enable_markdown_in_html = false;
|
|
@@ -3203,6 +3249,7 @@ apex_options apex_options_for_mode(apex_mode_t mode) {
|
|
|
3203
3249
|
opts.enable_mmark_index_syntax = false; /* Disabled by default - use --indices to enable */
|
|
3204
3250
|
opts.enable_textindex_syntax = false; /* Disabled by default - use --indices to enable */
|
|
3205
3251
|
opts.enable_leanpub_index_syntax = false; /* Disabled by default - use --indices to enable */
|
|
3252
|
+
opts.enable_emoji = false; /* MMD: no :name: emoji replacement by default */
|
|
3206
3253
|
opts.enable_emoji_autocorrect = false; /* MMD: no emoji autocorrect by default */
|
|
3207
3254
|
opts.enable_image_captions = true; /* MultiMarkdown: image captions enabled by default */
|
|
3208
3255
|
break;
|
|
@@ -3240,6 +3287,7 @@ apex_options apex_options_for_mode(apex_mode_t mode) {
|
|
|
3240
3287
|
opts.enable_strikethrough = false; /* Kramdown: no strikethrough by default */
|
|
3241
3288
|
opts.enable_autolink = true; /* Kramdown: autolinks enabled */
|
|
3242
3289
|
opts.enable_citations = false; /* Kramdown: no citations (different system) */
|
|
3290
|
+
opts.enable_emoji = false; /* Kramdown: no :name: emoji replacement by default */
|
|
3243
3291
|
opts.enable_emoji_autocorrect = false; /* Kramdown: no emoji autocorrect by default */
|
|
3244
3292
|
opts.enable_image_captions = false; /* Kramdown: no automatic image figure captions */
|
|
3245
3293
|
break;
|
|
@@ -3266,6 +3314,7 @@ apex_options apex_options_for_mode(apex_mode_t mode) {
|
|
|
3266
3314
|
opts.enable_quarto_callouts = false; /* Unified default: off unless explicitly enabled */
|
|
3267
3315
|
opts.enable_divs = true; /* Unified: Pandoc fenced divs enabled */
|
|
3268
3316
|
opts.enable_spans = true; /* Unified: bracketed spans enabled */
|
|
3317
|
+
opts.enable_emoji = true; /* Unified: :name: emoji replacement enabled */
|
|
3269
3318
|
opts.enable_emoji_autocorrect = true; /* Unified: emoji autocorrect enabled */
|
|
3270
3319
|
opts.enable_image_captions = true; /* Unified: image captions enabled by default */
|
|
3271
3320
|
break;
|
|
@@ -3443,12 +3492,18 @@ static int apex_to_cmark_options(const apex_options *options) {
|
|
|
3443
3492
|
return cmark_opts;
|
|
3444
3493
|
}
|
|
3445
3494
|
|
|
3495
|
+
/* One-time cmark-gfm core extension registration. Not thread-safe on its own. */
|
|
3496
|
+
void apex_ensure_cmark_extensions(void) {
|
|
3497
|
+
static pthread_once_t once = PTHREAD_ONCE_INIT;
|
|
3498
|
+
pthread_once(&once, cmark_gfm_core_extensions_ensure_registered);
|
|
3499
|
+
}
|
|
3500
|
+
|
|
3446
3501
|
/**
|
|
3447
3502
|
* Register cmark-gfm extensions based on Apex options
|
|
3448
3503
|
*/
|
|
3449
3504
|
static void apex_register_extensions(cmark_parser *parser, const apex_options *options) {
|
|
3450
3505
|
/* Ensure core extensions are registered */
|
|
3451
|
-
|
|
3506
|
+
apex_ensure_cmark_extensions();
|
|
3452
3507
|
|
|
3453
3508
|
/* Note: Metadata is handled via preprocessing, not as an extension */
|
|
3454
3509
|
|
|
@@ -5531,7 +5586,7 @@ char *apex_markdown_to_html(const char *markdown, size_t len, const apex_options
|
|
|
5531
5586
|
char *html_markdown_processed = NULL;
|
|
5532
5587
|
if (options->enable_markdown_in_html) {
|
|
5533
5588
|
PROFILE_START(html_markdown);
|
|
5534
|
-
html_markdown_processed = apex_process_html_markdown(text_ptr, img_attrs);
|
|
5589
|
+
html_markdown_processed = apex_process_html_markdown(text_ptr, img_attrs, options);
|
|
5535
5590
|
PROFILE_END(html_markdown);
|
|
5536
5591
|
if (html_markdown_processed) {
|
|
5537
5592
|
text_ptr = html_markdown_processed;
|
|
@@ -6032,6 +6087,10 @@ char *apex_markdown_to_html(const char *markdown, size_t len, const apex_options
|
|
|
6032
6087
|
return NULL;
|
|
6033
6088
|
}
|
|
6034
6089
|
|
|
6090
|
+
if (options->enable_task_lists) {
|
|
6091
|
+
apex_fix_blockquote_tasklists(document, cmark_find_syntax_extension("tasklist"), 0);
|
|
6092
|
+
}
|
|
6093
|
+
|
|
6035
6094
|
/* If output format is JSON, emit JSON right after parsing (before AST filters) */
|
|
6036
6095
|
if (options->output_format == APEX_OUTPUT_JSON) {
|
|
6037
6096
|
char *json = apex_cmark_to_pandoc_json(document, options);
|
|
@@ -6098,7 +6157,7 @@ char *apex_markdown_to_html(const char *markdown, size_t len, const apex_options
|
|
|
6098
6157
|
|
|
6099
6158
|
/* Postprocess callouts if enabled */
|
|
6100
6159
|
if (options->enable_callouts) {
|
|
6101
|
-
apex_process_callouts_in_tree(document, options->enable_py_callouts);
|
|
6160
|
+
apex_process_callouts_in_tree(document, options->enable_py_callouts, cmark_opts);
|
|
6102
6161
|
}
|
|
6103
6162
|
|
|
6104
6163
|
/* Process IAL (Inline Attribute Lists) BEFORE manual header IDs.
|
|
@@ -6594,8 +6653,8 @@ char *apex_markdown_to_html(const char *markdown, size_t len, const apex_options
|
|
|
6594
6653
|
}
|
|
6595
6654
|
}
|
|
6596
6655
|
|
|
6597
|
-
/* Replace GitHub emoji if in GFM
|
|
6598
|
-
if (
|
|
6656
|
+
/* Replace GitHub emoji if enabled (default on in GFM / unified family) */
|
|
6657
|
+
if (options->enable_emoji && html) {
|
|
6599
6658
|
PROFILE_START(emoji);
|
|
6600
6659
|
char *with_emoji = apex_replace_emoji(html);
|
|
6601
6660
|
PROFILE_END(emoji);
|
|
@@ -1704,12 +1704,10 @@ static void serialize_inline(terminal_buffer *buf,
|
|
|
1704
1704
|
}
|
|
1705
1705
|
|
|
1706
1706
|
/* Optionally replace :emoji: with Unicode for terminal output
|
|
1707
|
-
* when
|
|
1707
|
+
* when enable_emoji is set (default on in GFM / unified). */
|
|
1708
1708
|
const char *text_src = literal;
|
|
1709
1709
|
char *emoji_replaced = NULL;
|
|
1710
|
-
if (options &&
|
|
1711
|
-
(options->mode == APEX_MODE_GFM ||
|
|
1712
|
-
apex_mode_is_unified_family(options->mode))) {
|
|
1710
|
+
if (options && options->enable_emoji) {
|
|
1713
1711
|
emoji_replaced = apex_replace_emoji_text(literal);
|
|
1714
1712
|
if (emoji_replaced) {
|
|
1715
1713
|
text_src = emoji_replaced;
|
|
@@ -66,9 +66,13 @@ static const char *callout_type_name(callout_type_t type) {
|
|
|
66
66
|
/**
|
|
67
67
|
* Check if a blockquote is a Bear/Obsidian style callout
|
|
68
68
|
* Pattern: > [!TYPE] Title or > [!TYPE]+ Title or > [!TYPE]- Title
|
|
69
|
+
*
|
|
70
|
+
* On success, *marker_len is the number of bytes at the start of the first
|
|
71
|
+
* text node taken up by the marker and the whitespace after it. Everything
|
|
72
|
+
* else on the marker line (including inline markup) is the title.
|
|
69
73
|
*/
|
|
70
74
|
static bool is_bear_callout(cmark_node *blockquote, bool enable_py_callouts, callout_type_t *type,
|
|
71
|
-
|
|
75
|
+
size_t *marker_len, bool *collapsible, bool *default_open) {
|
|
72
76
|
if (cmark_node_get_type(blockquote) != CMARK_NODE_BLOCK_QUOTE) return false;
|
|
73
77
|
|
|
74
78
|
/* Get first child (should be paragraph) */
|
|
@@ -96,14 +100,7 @@ static bool is_bear_callout(cmark_node *blockquote, bool enable_py_callouts, cal
|
|
|
96
100
|
*default_open = false;
|
|
97
101
|
const char *title_start = p + 1;
|
|
98
102
|
while (*title_start == ' ' || *title_start == '\t') title_start++;
|
|
99
|
-
|
|
100
|
-
const char *title_end = strchr(title_start, '\n');
|
|
101
|
-
if (title_end) {
|
|
102
|
-
*title = strndup(title_start, title_end - title_start);
|
|
103
|
-
} else {
|
|
104
|
-
*title = strdup(title_start);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
103
|
+
*marker_len = (size_t)(title_start - text);
|
|
107
104
|
return true;
|
|
108
105
|
}
|
|
109
106
|
}
|
|
@@ -138,106 +135,149 @@ static bool is_bear_callout(cmark_node *blockquote, bool enable_py_callouts, cal
|
|
|
138
135
|
type_end++;
|
|
139
136
|
}
|
|
140
137
|
|
|
141
|
-
/* Extract title (rest of the line after ] or +/-) */
|
|
142
138
|
const char *title_start = type_end + 1;
|
|
143
139
|
while (*title_start == ' ' || *title_start == '\t') title_start++;
|
|
140
|
+
*marker_len = (size_t)(title_start - text);
|
|
141
|
+
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
static bool is_line_break(cmark_node *node) {
|
|
146
|
+
cmark_node_type t = cmark_node_get_type(node);
|
|
147
|
+
return t == CMARK_NODE_SOFTBREAK || t == CMARK_NODE_LINEBREAK;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Move the inlines on the marker line out of the first paragraph and render
|
|
152
|
+
* them as the title HTML. Returns NULL when the marker line has no title.
|
|
153
|
+
*/
|
|
154
|
+
static char *extract_callout_title_html(cmark_node *para, int render_options) {
|
|
155
|
+
/* The HTML renderer dereferences a paragraph's parent, so render from a document */
|
|
156
|
+
cmark_node *title_doc = cmark_node_new(CMARK_NODE_DOCUMENT);
|
|
157
|
+
cmark_node *title_para = cmark_node_new(CMARK_NODE_PARAGRAPH);
|
|
158
|
+
if (!title_doc || !title_para || !cmark_node_append_child(title_doc, title_para)) {
|
|
159
|
+
if (title_para) cmark_node_free(title_para);
|
|
160
|
+
if (title_doc) cmark_node_free(title_doc);
|
|
161
|
+
return NULL;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
cmark_node *child = cmark_node_first_child(para);
|
|
165
|
+
while (child && !is_line_break(child)) {
|
|
166
|
+
cmark_node *next = cmark_node_next(child);
|
|
167
|
+
cmark_node_append_child(title_para, child);
|
|
168
|
+
child = next;
|
|
169
|
+
}
|
|
170
|
+
if (child) {
|
|
171
|
+
cmark_node_free(child);
|
|
172
|
+
}
|
|
144
173
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
if (
|
|
149
|
-
*
|
|
150
|
-
|
|
151
|
-
*
|
|
174
|
+
char *title = NULL;
|
|
175
|
+
if (cmark_node_first_child(title_para)) {
|
|
176
|
+
char *html = cmark_render_html(title_doc, render_options & ~CMARK_OPT_SOURCEPOS, NULL);
|
|
177
|
+
if (html) {
|
|
178
|
+
const char *start = html;
|
|
179
|
+
if (strncmp(start, "<p>", 3) == 0) start += 3;
|
|
180
|
+
const char *end = start + strlen(start);
|
|
181
|
+
while (end > start && isspace((unsigned char)end[-1])) end--;
|
|
182
|
+
if (end - start >= 4 && strncmp(end - 4, "</p>", 4) == 0) end -= 4;
|
|
183
|
+
while (end > start && isspace((unsigned char)end[-1])) end--;
|
|
184
|
+
while (start < end && isspace((unsigned char)*start)) start++;
|
|
185
|
+
if (end > start) {
|
|
186
|
+
title = strndup(start, (size_t)(end - start));
|
|
187
|
+
}
|
|
188
|
+
free(html);
|
|
152
189
|
}
|
|
153
190
|
}
|
|
154
191
|
|
|
155
|
-
|
|
192
|
+
cmark_node_free(title_doc);
|
|
193
|
+
return title;
|
|
156
194
|
}
|
|
157
195
|
|
|
158
196
|
/**
|
|
159
197
|
* Convert blockquote to callout HTML
|
|
160
198
|
*/
|
|
161
199
|
static void convert_blockquote_to_callout(cmark_node *blockquote, callout_type_t type,
|
|
162
|
-
|
|
200
|
+
size_t marker_len, bool collapsible, bool default_open,
|
|
201
|
+
int render_options) {
|
|
163
202
|
const char *type_name = callout_type_name(type);
|
|
164
203
|
|
|
165
|
-
/*
|
|
166
|
-
|
|
167
|
-
|
|
204
|
+
/* Strip the marker from the first text node, then lift the rest of the
|
|
205
|
+
* marker line into the title */
|
|
206
|
+
cmark_node *first_para = cmark_node_first_child(blockquote);
|
|
207
|
+
cmark_node *first_text = cmark_node_first_child(first_para);
|
|
208
|
+
const char *text = cmark_node_get_literal(first_text);
|
|
209
|
+
if (text && strlen(text) > marker_len) {
|
|
210
|
+
char *rest = strdup(text + marker_len);
|
|
211
|
+
if (rest) {
|
|
212
|
+
cmark_node_set_literal(first_text, rest);
|
|
213
|
+
free(rest);
|
|
214
|
+
}
|
|
215
|
+
} else {
|
|
216
|
+
cmark_node_free(first_text);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
char *title = extract_callout_title_html(first_para, render_options);
|
|
220
|
+
if (!cmark_node_first_child(first_para)) {
|
|
221
|
+
cmark_node_free(first_para);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const char *title_html = title ? title : type_name;
|
|
225
|
+
size_t start_size = strlen(title_html) + 256;
|
|
226
|
+
char *html_start = malloc(start_size);
|
|
227
|
+
if (!html_start) {
|
|
228
|
+
free(title);
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const char *html_end;
|
|
168
232
|
|
|
169
233
|
if (collapsible) {
|
|
170
|
-
snprintf(html_start,
|
|
234
|
+
snprintf(html_start, start_size,
|
|
171
235
|
"<details class=\"callout callout-%s\"%s>\n<summary>%s</summary>\n<div class=\"callout-content\">\n",
|
|
172
|
-
type_name, default_open ? " open" : "",
|
|
173
|
-
|
|
236
|
+
type_name, default_open ? " open" : "", title_html);
|
|
237
|
+
html_end = "\n</div>\n</details>";
|
|
174
238
|
} else {
|
|
175
|
-
snprintf(html_start,
|
|
239
|
+
snprintf(html_start, start_size,
|
|
176
240
|
"<div class=\"callout callout-%s\">\n<div class=\"callout-title\">%s</div>\n<div class=\"callout-content\">\n",
|
|
177
|
-
type_name,
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/* Get blockquote content (skip first paragraph with [!TYPE]) */
|
|
182
|
-
cmark_node *first_para = cmark_node_first_child(blockquote);
|
|
183
|
-
if (first_para) {
|
|
184
|
-
/* Remove the [!TYPE] line from first paragraph */
|
|
185
|
-
cmark_node *first_text = cmark_node_first_child(first_para);
|
|
186
|
-
if (first_text && cmark_node_get_type(first_text) == CMARK_NODE_TEXT) {
|
|
187
|
-
const char *text = cmark_node_get_literal(first_text);
|
|
188
|
-
if (text) {
|
|
189
|
-
/* Skip to content after the title line */
|
|
190
|
-
const char *newline = strchr(text, '\n');
|
|
191
|
-
if (newline && *(newline + 1)) {
|
|
192
|
-
cmark_node_set_literal(first_text, newline + 1);
|
|
193
|
-
} else {
|
|
194
|
-
/* Remove the text node entirely if it's just the [!TYPE] line */
|
|
195
|
-
cmark_node_unlink(first_text);
|
|
196
|
-
cmark_node_free(first_text);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
241
|
+
type_name, title_html);
|
|
242
|
+
html_end = "\n</div>\n</div>";
|
|
200
243
|
}
|
|
244
|
+
free(title);
|
|
201
245
|
|
|
202
|
-
/*
|
|
246
|
+
/* Wrap the blockquote; its content renders normally inside the wrapper */
|
|
203
247
|
cmark_node *html_before = cmark_node_new(CMARK_NODE_HTML_BLOCK);
|
|
204
248
|
cmark_node_set_literal(html_before, html_start);
|
|
249
|
+
free(html_start);
|
|
205
250
|
|
|
206
251
|
cmark_node *html_after = cmark_node_new(CMARK_NODE_HTML_BLOCK);
|
|
207
252
|
cmark_node_set_literal(html_after, html_end);
|
|
208
253
|
|
|
209
|
-
/* Insert HTML nodes */
|
|
210
254
|
cmark_node_insert_before(blockquote, html_before);
|
|
211
255
|
cmark_node_insert_after(blockquote, html_after);
|
|
212
|
-
|
|
213
|
-
/* Convert blockquote to div (we'll let the content render normally) */
|
|
214
|
-
/* Actually, we can just keep it as blockquote and wrap it */
|
|
215
256
|
}
|
|
216
257
|
|
|
217
258
|
/**
|
|
218
259
|
* Process callouts in AST
|
|
219
260
|
*/
|
|
220
|
-
void apex_process_callouts_in_tree(cmark_node *node, bool enable_py_callouts) {
|
|
261
|
+
void apex_process_callouts_in_tree(cmark_node *node, bool enable_py_callouts, int render_options) {
|
|
221
262
|
if (!node) return;
|
|
222
263
|
|
|
223
|
-
/* Check if current node is a blockquote callout */
|
|
224
264
|
if (cmark_node_get_type(node) == CMARK_NODE_BLOCK_QUOTE) {
|
|
225
265
|
callout_type_t type;
|
|
226
|
-
|
|
266
|
+
size_t marker_len = 0;
|
|
227
267
|
bool collapsible, default_open;
|
|
228
268
|
|
|
229
|
-
if (is_bear_callout(node, enable_py_callouts, &type, &
|
|
230
|
-
convert_blockquote_to_callout(node, type,
|
|
231
|
-
|
|
232
|
-
return; /* Don't recurse into modified node */
|
|
269
|
+
if (is_bear_callout(node, enable_py_callouts, &type, &marker_len, &collapsible, &default_open)) {
|
|
270
|
+
convert_blockquote_to_callout(node, type, marker_len, collapsible, default_open,
|
|
271
|
+
render_options);
|
|
233
272
|
}
|
|
234
273
|
}
|
|
235
274
|
|
|
236
|
-
/*
|
|
275
|
+
/* Recurse into children, including converted callouts, so nested
|
|
276
|
+
* callouts (> > [!TYPE]) are converted too */
|
|
237
277
|
cmark_node *child = cmark_node_first_child(node);
|
|
238
278
|
while (child) {
|
|
239
279
|
cmark_node *next = cmark_node_next(child);
|
|
240
|
-
apex_process_callouts_in_tree(child, enable_py_callouts);
|
|
280
|
+
apex_process_callouts_in_tree(child, enable_py_callouts, render_options);
|
|
241
281
|
child = next;
|
|
242
282
|
}
|
|
243
283
|
}
|
|
@@ -38,9 +38,10 @@ typedef enum {
|
|
|
38
38
|
} callout_type_t;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
* Process callouts in AST (postprocessing)
|
|
41
|
+
* Process callouts in AST (postprocessing). render_options are the cmark
|
|
42
|
+
* options used to render inline markup in callout titles.
|
|
42
43
|
*/
|
|
43
|
-
void apex_process_callouts_in_tree(cmark_node *document, bool enable_py_callouts);
|
|
44
|
+
void apex_process_callouts_in_tree(cmark_node *document, bool enable_py_callouts, int render_options);
|
|
44
45
|
|
|
45
46
|
/**
|
|
46
47
|
* Preprocess Python-Markdown callouts into Obsidian-style blockquotes.
|
|
@@ -83,10 +83,10 @@ static int extract_citation_key(const char *text, int pos, int len, char **key_o
|
|
|
83
83
|
|
|
84
84
|
/* If we started with {, skip past it */
|
|
85
85
|
if (text[pos] == '{') {
|
|
86
|
-
return (p - text) - pos + 1; /* +1 for closing } */
|
|
86
|
+
return apex_ptrdiff_to_int((p - text) - pos + 1); /* +1 for closing } */
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
return p - start;
|
|
89
|
+
return apex_ptrdiff_to_int(p - start);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/**
|
|
@@ -145,6 +145,19 @@ static int parse_pandoc_citation(const char *text, int pos, int len,
|
|
|
145
145
|
p++;
|
|
146
146
|
int key_len = extract_citation_key(text, apex_ptrdiff_to_int(p - text), len, &key);
|
|
147
147
|
if (key_len > 0 && key) {
|
|
148
|
+
/* `@Name: …` in prose (iA Writer Annotations dumps) must not swallow
|
|
149
|
+
* the trailing colon into the key — that yields <!--CITE:Name:--> which
|
|
150
|
+
* emoji then corrupts, and leaves the rest of the line as orphan text. */
|
|
151
|
+
size_t key_strlen = strlen(key);
|
|
152
|
+
if (key_strlen > 0 && key[key_strlen - 1] == ':') {
|
|
153
|
+
const char *after_colon_key = p + key_len;
|
|
154
|
+
if (after_colon_key >= text + len ||
|
|
155
|
+
isspace((unsigned char)*after_colon_key) ||
|
|
156
|
+
isdigit((unsigned char)*after_colon_key)) {
|
|
157
|
+
key[key_strlen - 1] = '\0';
|
|
158
|
+
key_len--;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
148
161
|
if (options && options->enable_quarto_xrefs && apex_citation_key_is_quarto_xref(key)) {
|
|
149
162
|
free(key);
|
|
150
163
|
return 0;
|